<template>
  <div class="reply_item_body">
    <div><el-avatar :src="replyData.fromPortrait"></el-avatar></div>
    <div class="reply_item_right">
        <div>
            <span>{{replyData.fromNickName}}</span>
            <span v-if="replyData.replyType == 0">
                回复 <a href="">@{{replyData.toNickName}}</a>
            </span>
            <span>{{replyData.replyContent}}</span>
        </div>
        <div class="reply_item_info">
            <span class="span">{{replyData.createTime}}</span>
            <span class="reply" @click="handlerReplyReply">回复</span>
        </div>
    </div>
  </div>
</template>

<script>
export default {
  components: {
    
  },
  mounted() {
    
  },
  props:{
      replyData: Object,
  },
  data() {
    return {
      
    }
  },
  methods: {
    // 打开 回复 数据框，向上产生事件
    handlerReplyReply(){
        this.$emit('replyEvent', this.replyData);
    }
  },
}
</script>

<style>
.reply_item_body{
    display: flex;
    margin: 10px 0;
}
.reply_item_right{
    margin-left: 10px;
}

.reply_item_info{
    margin-top: 10px;
}
.reply_item_info .span{
  color: #666;
}
.reply_item_info .reply{
  cursor: pointer;
  margin-left: 10px;
}
</style>